<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //实例成员就是构造函数内部通过this添加的成员，如name sex就实例成员 
        function Person(name, sex) {
            this.aname = name;
            this.asex = sex;
        }
        //实例成员只能通过对象来访问
        var person = new Person('ArimaMisaki','fale');
        console.log(person.aname);
        console.log(Person.aname);

        //静态成员就是构造函数上的添加的成员
        Person.aage = 13;
        //静态成员只能通过构造函数来访问
        console.log(Person.aage);
        var person1 = new Person('person2','fale');
        console.log(person1.aage);
    </script>
</body>

</html>